# $Id: PKGBUILD 150633 2012-02-19 01:12:18Z allan $
# Maintainer: kevin <kevin@archlinux.org>

pkgname=perl-file-mimeinfo
_realname=File-MimeInfo
pkgver=0.16
pkgrel=1
pkgdesc='Perl/CPAN File::MimeInfo module - Determine file type, includes mimeopen and mimetype'
arch=(any)
license=('GPL' 'PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
depends=('perl-file-basedir' 'perl-file-desktopentry' 'shared-mime-info'
'perl')
options=(!emptydirs)
source=(http://search.cpan.org/CPAN/authors/id/P/PA/PARDUS/${_realname}/${_realname}-${pkgver}.tar.gz)
md5sums=('c024adace5d3a4ed27fd8a46c7f2dedb')

build() {
  cd ${srcdir}/${_realname}-${pkgver}

  # install module in vendor directories.
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd ${srcdir}/${_realname}-${pkgver}
  make test
}

package() {
  cd ${srcdir}/${_realname}-${pkgver}
  make install DESTDIR=${pkgdir}
}
